package com.xzs.demo.controller.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.xzs.demo.entity.UserDao;
import com.xzs.demo.service.UserDaoService;
@Controller
@RequestMapping("/web")
public class WebController {
	@Autowired
	private UserDaoService uDao;
	
	@RequestMapping(value = "/web1")
	@ResponseBody
	public List<UserDao> wholeInfo(HttpServletRequest httpRequest) {
		List<UserDao> selectAll = uDao.selectAll();
		return selectAll;
		
		
	}
	
	@RequestMapping(value = "/web2")
	@ResponseBody
	public List<UserDao> wholeInfo2(HttpServletRequest httpRequest) {
		List<UserDao> selectAll = uDao.selectAll();
		return selectAll;
		
		
	}
	
	@RequestMapping(value = "/web3")
	
	public String wholeInfo3(HttpServletRequest httpRequest) {
	
		return "xzs";
		
		
	}
}
